revision=r$(git rev-list --count HEAD)
hash=$(git rev-parse --short HEAD)
buildversion=$revision-$hash
buildtime=$(date +"%Y-%m-%d %H:%M:%S")
buildinfo=./src/buildinfo.json

cat <<EOF >$buildinfo
{
    "buildversion":"$buildversion",
    "buildtime":"$buildtime"
}
EOF

echo "update buildinfo.json finish"